<?php

/*
 * @author Ebrain Cedeno <ebraincedeno@gmail.com>
 */
class TIframe extends TWidget{
    
    public $Url = "#";
    public $Scrolling = 'auto';
    
    public function __construct($name = __CLASS__) {
        parent::__construct($name);
        $this->Width = 200;
        $this->Height = 200;
    }
    
    public function show(){
        
        if ($this->Visible == true){
            
            if (!array_key_exists('style', $this->OptionsAditional)){
                $this->OptionsAditional['style'] = array('border:none');
            }
            else{
                $this->OptionsAditional['style'][] = 'border:none;';
            }
            
            return '<iframe src="'.$this->Url.'" scrolling="'.$this->Scrolling.'" width="'.$this->Width.'" height="'.$this->Height.'" '.$this->getOptionsAditional().'></iframe>';
        }
        
    }
    
}
?>
